Add where collection function and getAll function