1.clean code according Paul's review  2. I got wrong understanding of function weekday, and now fix it 3. add test cases for extract()