update box function in test_sketch