added some prelim code