Merge pull request #1 from liqiangtq/Qw

Add function