now writes additions AND deletions to the db! whooooo