added functions to models, added functions and route functionality
Merge pull request #4 from nramin/david

added functions to models, added functions and route functionality