updated code for ui changes