remove braces from oneline if statement
Update error checking. Update tesing array