adds timing section and delay function