implemented unary negation and related bug fixes