comitting changes to database