fix extend function previously implemented has no parent