Working version of oceanlink pattern code