added memoization to inbox and profile views