fixed prob with array out of index exception on names