replace simps with trapz