simplified code in continuous statistics