implemented a framework for getting variables based on a key