proper index in output