Some small functions that may come in handy