refined calculation for EDD