add clear method (issue #15)