updated everything to work with astropy quantities