Part of change to calculate first and last applicable