removed $wdir var