grid shifting utility functions written, scale definer added