beginning of boxes code