updated to use laravels inbuild chunk function