updated tool to automatically add upstream remotes