fix function deFunction() by adding negation so that unit tests work as described