minor updates and added a plaintext version