adding clear() method