Updated with @alastairs feedback