implementation of myers diff algorithm