added controller and connected stored procedures