added a href function to state for building urls and a format to route for the same purpose