Using new API features for nicer code