defined controller and hit detector classes