changed the order of testing