implemented proper scaling.  resolves #603