adequate extend function implementation