added getAll method for db