Fully functioning code

-Delay time