updated so that it works with new huggle