This seems better, if only it would compile :(