altered the scripts for calculating average height in order to also compute the position of B particles