removed deprecated function and updated read