removed potentially erroneous getUrl function