removed duplicate code with a new #get_all method