planning code