Added read function prototype to top