changing statuses updates the database