abstracted boolean logic into private methods