move extension setup fn earlier in the process