changes:
 - usage examples in readme
 - remove I/O code
 - refactor
 - simplify