changed it to accept url