working function to share some pins