Switched from recv to gets