added functionality to read variable data