add sync
fix trim
fix trim
fix mistakes