added wasum and wsqsum (tested)