refactor to include better partials and interpolator function