code interface change: return first element's code instead of array