moved np.absolute() calls