everything working except updates
halfway optimized using precomputedProducts and precomputedUsers