adding in better url handling fixes #3