moved out another anonymous function