created a controller to implement angular