changed template in BST files to include keytype