got rid of dependence on deprecated numpy features