implemented TMP prime checking
increased template recursion depth