merge the new 0.4 code