starting the read function