Terser implementation. Less comprehensible though?