updated matches controller and added hooks