a few new utility functions