More scalable implementation