Adding extension logic