modify some structure, add more ref