add rudimentary loop detection and version bump