moved deletion to db class