changed if/else if in togglemark