added function calls to routes