changed clearAll method