combine tests, remove unnecessary loop