press p to toggle debug