divide logic and presentation