modify code to support mutiple partials