added two helper methods