added after minor modification, variable name change