calculate versions earlier to be wary of race conditions