james | refactoring logic out of the partials
james | cleaned up duplicate logic