helper functions for running tests