moving generic function to new tools file