added support for running with gc