refactoring for ease of use
version 0.2