Included stdio.h and printed out the aray to debug