added timed-key function.