AND operator

Removed the second if statement and combined the AND operator into the
first if statement.