added rescale() and restrict()