added optional support for ruby