new coordinates for before and after rect