* fixed algorithm, built-in unit test (with Leonid)
* interactive console