correctly adds to database