changing from manipulating hash to calling the router