worked on ui logic