added scala port