implemented time based spawning of keys