add the delay function ok