added tests and helper.inherit