add test methods
extract methods
remove unnecessary  code
fix few bugs