added some logic for temporal references... there are still a lot of placeholders