Removed all references to pair and replaced them with the pos structure