two extend function