need to debug setDone in switching