updated read, added mutex