import ddahl's code