arrays added and syntax errors fixed