some bug fixed and now support repeat