minor modifications to arrays and fixed some comments