square detection switch and camera singleton
working debug mode