added database, defined RESTful routing