wiring ui
refactor to mvc