added timestamp function to example