abstracted out triangle object