removes anonymous function