add timestamp to function