function test code
Merge remote-tracking branch 'matthew/master'
code analysis and test