started replacing boolean with tbool