Added support for custom options