added proper toggle functionality

Signed-off-by: Andreas Heiberg <git@andreas-heiberg.com>