removed debug clearing of arrays and output