Small rewrite to make it easier.