adding service layer and using Optional
adding service layer and Optional