avoid anon functions in test