clean public/ only when exists
explain what the magic does and why