cleaning up url click function