Added the getAllNames function