(partially) add clear function.