Added some custom functions.