changed some  to ! instead of = false