timestamp calculation modified