eliminate unnecessary anonymous function