updated to use and with &&