box implementation