add global defaults feature. fix #18