progress on wake_up and terminate