Added ability to take url as a parameter.