Better versioning function