changed variables names for proper understanding