Changed behavior of extendPlan() and added PHPDoc