fixed logic, was using && instead of &