wrote client for server, added do while and fixed loop tracing