update view logic