helper and database connect