Adding distance ergs implemented.