add basic read function