added scale degree func