arrays work in spec but not in method