added clear method to publick api