#20 add new func and fix bug