contour funciton workaround closes #59