replace sleep to read