adding context switching code sample