added createBox function