Code for generating hashkeys for the positions done