Is there a reason you are declaring these two arrays within the while() loop?