abstract away pinning, to try different implementations later