Some helper functions I use.