store value at applicationWillResignActive