changed all false array checks
changed some uggly && statements to a funciton