added support for custom OM classes