Implement suggestion by @Exio4