added prelim parsing middleware