changed tbool to int -Kevin