Imported from https://github.com/mohanty-sd/SHAPES
