add contract code