add an implementation of max_common_subsequence