how to calculate impairment loss