added class for handling path energy