database connection support and timer added