I made a mistake. Change wait to the same number following rgb(). In this case, I should have changed it to 10