implemented scale on the left side and fixed normalization