replacing relativeSq array by macro