improve code : prefer and and or over && and ||