corrected variable assignment