test on MacOS has passed, need edit makefile to adapt for SunOS and Linux