added check_tortp() function