fixed the clear method