sends to database