added the triangle and rectangle classes