More performant implementation