removed unnecessary boolean conversions