added custom functions