Changed to support scala