Transforming livestock waste into renewable energy