started working on api to access database