changes made to add the logical operator inside the coding