Dynamics near a heteroclinic network