completed 1st pass at psl code for elections