add plan functionality