added triangle area calculation