added two utility methods