changes in api and database model