add ret code for pub