Adding functionality to determine No of process as per no of devices connected