big refactor from 0.0.8 to 0.1.0