More logical way of resetting boxes