added scaling/shifting routines for Ben