added prelim code in class