finish the third version's core code
finish the third version's core code