wonderful curve & some bug fix