implement clear mechanism