more api calls working. Database code written.