[refactoring] remove a nested synchronized