added function to find kth smallest element in BST