several handy functions