port to console
Merge pull request #30 from vnitinv/master

port to console