corrected scala