triangle checker working