increase some function and fix some bug