new version of https://github.com/PeterTheOne/petergrassbergerat