add a few utility functions