making previous change more scalable