added suc and pred functions