fixed read/write, added tags, etc