renamed hash variable to avoid shadowing