bricks save function