Using smart AI and IoT cloud-based technologies to optimize performance of pre-digital factory machinery and acquire full Industry 4.0 capabilities