checking for enrollment[0] before enrollment[0].pid