add discrete option for faster evaluations