old array code