Make read function work.