calculate version dynamically