read function tests