added scaling to rendering