code is refactored to add new extensions