auto
added check of url

also modified if required