add defensive codes