changed name of method
fatal mistake: mind the size of array