created separate rtos.js file