test code for server