Added logic for xform