refactor to single file library
0.0.2