Can now change speed by setting the delay variable