test helper functions