added clear and getAll functions