make db connect and consts.
change dbconnect to singleton.