removed unnecessary booleans