Change @plan to refer to plan object