store key at start of fns