Now pair_shape works. Still need to be modified for accuracy