primitive array detection added