fixed tri&; added test