Modified to work with SSR data