added scaling
added scaling