implement the insert, read function