updated for big data structure