I have fixed the arrayoutofbound exception