switched to struct unpacking in handling client commands