services pattern