helper functions for testing in golang