refactored to partials