added db->amp function