added classes
added functions to triangle