working version on definition and on click for hash