added support for spark