drop some brackets and replace ors and ands in guards with ; and  ,