remove dependancy on database, part 1