added clearItems function