initialize matrix correctly in needleman-wunsch