added new record endpoint to store in db