adding helper method to use in routes file