Implement context switch partially