added handling of arrays. not done yet