refactoring part-from to use parametrized op