Add box generator. refactoring