Flow of residence permits granted based on social ties