adding right_triangle function