How a bricklaying machine works