Finds a betterr solution to handle keypari