Implementing service pattern