Implement suggestion by @embray