rewriting routes to work with model