connect contacts to database friend table