update logic

update logic