change spawn to spawn_link