added code for db connection and properties loading