added scala syntax support