adding the read function call