add two way data binding and clean code