used with mock