fixed 'printArray' function
Documentation added