add extension parsing