Added read function.