add read_with_timeout