save modification to database