fixes #2 Added base classes with tests