use stdin and emit on RING
clean up, single allocation
Merge pull request #4 from tessel/ek-gprs

use stdin and emit RING