Imported from https://github.com/dronaka/DSB2017