routine update - trying to work out my date function