remove dependence on atpy