Added pre_class() and pred_class() functions