Also, `bitmap` in other functions is used directly from the outer scope. I think here we should follow suit (whether it's bad practice or not).