code refactoring
- separate the model, view code