getCommand now takes whole string
altered print from server to keep printing till end