sort of works, but not waiting for message
fixed timeout issue