safe clean
update logic to be less complicated

and less smart unfortunately at the same time, needs to be improved