rename two identical variables to same name and remove guard