implement adding to database