add generic getAll method