compress logic into one line
add better method for handling template switching based on bootstrap version