improved reset_server
added tests