timecapsule alike script based on laurent's work.