refactoring the helmert operation generator