made route controller functional