merge this peusocode for serverDB