mod of some plan code