more work on inverting and toggling

Signed-off-by: Constantin Runge <uroc327@cssbook.de>