aadded clear and getAll functions