Added user input
Added triad calculation