add license and fix #32.