a little modification to make it more scalable