update bst to store key and value pairs