new calDistance assert check,new codeAddress function