add support for url, error handling not yet complete