added multiple extensions support