Remove isArray function. Comments also added