added two new utility functions