[refactor] bringing code to extension.builder