rough implementation details outlined in README.txt