a couple more utility functions