changing call of anonymous function to be compatible with strict use