begining server framework code