add ability to access codes as Array or Hash