works, a bit neater