updated helper script
fixed risidual issue and added contours
some changes