changed box functions to better set moving boxes