orc: work implementation and unit tests