Working on render function in UI