move some logic to other class