modified fetchAll technique and added home hash