add libraries in proper order; refine test case