added RESTful API thing and mongodb connection