Add delay function and test on board