changed some variable names for readability