updated for Haggle 0.4