modified nest to be more reliable