only depend on the extension when necessary