added some utility functions for testing