refactor to include better partials and use interpolator function