add headfirst official code
add test code