added extend code