use helper function for routes