created higher order functions for date and thread id