use same code for Thead stmt and Expression.