built controller with tests