added fetch all logic