Changed recv to gets