prepares to write api to database