now produces output plans. needs to be tested