added few ui logic