added invert to slice so that i could implement not which I apparently forgot