added a toString method to figure class