added code for anchor click