add read on and fix some bugs