Refactor prof. mod.: compiling, not tested