changed a few variables names for better readability