combine these if()s with &&