fix bug, add copyright