update logic for analysis page