Refactor finding position for new hash entry