move hash and slot calculations to outside of locks