Added support for custom compound