Created a separate class for NeedlemanWunsch