updated read_only functionality