moved function openHashLink to the correct scope