added apd method and test.t checks that apd and epd difference is less than 1 sigma