Some useful funcs I use.