update comments; take out functions in tmachine