Adding the ability to write to the database