shifting data mapping max and mins to arrays