implement pair and others