implement next rule and fix mispelling in class