removed input stream queue; removed read and write methods, all untested!