embedded hash function into table directly to remove some unecessary lines of code.