bugid-32623 get rid of anonymous function