Adding bugs logic