introduce InputHandle to reduce type complexity
add Read, and some cleanup