adding plan functionality