simpler, nicer version