updated extends logic