implemented grid toggling, frontend and backend