Added controller funtcion to routes