Replacing service process class with a function.. easier