worked on method.
fixed bug with reading