export according to the extension