fixing bug where loop prints the damn array 100 times