Neater way of testing