added support for custom options