updated controllers, added tests