Updated to work in non-real time conditions

Requires to be updated and tested for real-time