move logic to client service