Changed the way wdat5 is configured