explained below in https://news.ycombinator.com/item?id=49228432