added custom functions for Time library