-seperating ui and logic