Added timestamp to n function