Implemnented scaling for 3x3 and 4x4