added clear function to wipe the store of a given type