improvements and variable name changes