added sequence to map and character def's for sorting.