move some handler registration