changed arduino code