added __nonzero__ and __bool__