updated examples so that run in test mode