implement clear method