move computations to service