catch up with https://gist.github.com/DieHertz/871535b029dd98d6d349