added url checking