Need a comment here that this is skipping previously defined entries, it's not so obvious from the code alone why you would start at pos