revamping web service to include an api to access database (first commit)