modified logic (service layer added)