initial version (from perceptualentropy.com)