refactored based on the book
refactored based on the book
added some new files