added support for custom Order class