modification to get from url. Needs to be improved