TODO: fix for 4 processes
Minor changes
Add timer