first implementation of server