update note and code collect function