added multiple checks iaw hw3-3
added url checking