added dimensionalWeight function