more performant solution