only import plan module when necessary