reset the logic