added pre-release and build metadata logic to semantic version