added w var
resolved merg conflict: kept both