clear() function works