formatting and commenting for cursor_logic and graphics_logic