tested with more threads. Approach seems to work.
created an interface for the operation