Updated with v0.8 code