Delegate method now returns array of codes rather than just a single code.