Update to the logic

Signed-off-by: Kwpolska <kwpolska@gmail.com>