Revert to the older solution since it was more performant