order of global variables changed. Added test cases
Merge remote-tracking branch 'origin/master'