#20 modifications requested by @KenTiN