add read logic