Modify to rename variables for prevent shadowing