refactored the version toggle addition code to read at least a little better