U: little modification
U: refactor, simplify and change into sync method