added rudimentary url checking