separated the controllers to two .js files