early sub code