Energy saving solutions for a hydraulic excavator