Changed drawInPlace function to accept any segment of the array; added comments