attempted triangle method, seems difficult and overcomplicated