Added user interface code