Added the ability to create a variable number of boxes