add auto-version detection (last untested)