refactoring
fixes #4