Now including the database insert