make computeSGW more flexible by using function pointer
reconstructBySGW properly implemented
Some improvement in reconstructSGW