Arrays code has a problem with adding at the start, looking into the other functions