corrected variable collision