modified dld template, fixed bug