updated logged to save to the database