removed unecessary code, changed variable name