generalize array to object, and use in fail