minor utility functions