Updated to use 100% non blocking code