Added dynamic UI code