2088: move some code