implement basic server framework