Imported from https://github.com/shakty/optimal-design