increased box size to account for floating point error; started implementing local variables to avoid accessing memory at each iteration (densityi)