use group by to ensure we get single results for contacts

use group by to ensure we get single results for contacts