added function to cap expected values