use a better way to insert timestamp