add license and fix format.