done the checking better in one line