partial rewrite of ds-gone