add common utility functions