rough outline of functionality to prevent multiple rounds of prompting; not fully tested