save last choice but the code is dirty