added new functionality to configure, and replace var