Imported from https://github.com/mathetake/intergo
