preparation for database connection

Added custom functions (thanks to gesture group)