added method for retrieving optimal sequence alignment