add methods for calculating ld