move service stuff to service class