that is quite a lot of fancy refactoring #63