added scaledSize to aftermap code