working on sample examples of service and factory