working prototype for multiple processes