slightly changed awssum