Code for Wdwet