adapt code to dui