Updated to accept url, but debugging necessarry