updated double code