adding preventDefault to stop hash from being appeneded to end of url