Reverting precentatge calculation logic due to performance issue