slight modification to match new github code