omapi implementation and tests