reads correctly, needs functions