update tests add delay function