several functions added to the initial model and config temlate for db connection.