added proper read structure