make check more generic