refactoring for easier inheritance
v 1.0.2