logic update

Logic update