added Prereq checking code

added 2 new functions filterByPrereq and satisfiesPrereq